Example for Configuring a Rule Expression in MDM |
This topic provides an example for rule expression for a guard in a state transition while designing a State Model. |
|
Consider the following data structure of the hub entity state business object:
<tuple>
<new>
<businessobject>
<CustomerMaster>
<id>774</id>
<name>John Doe</name>
<age>23</age>
</CustomerMaster>
</businessobject>
<mdmmetadata>
<userdn>PARAMETER</userdn>
<dbevent>PARAMETER</dbevent>
<hub>
<keys>PARAMETER</keys>
<backend>PARAMETER</backend>
<entity>PARAMETER</entity>
</hub>
<spoke>
<keys>PARAMETER</keys>
<backend>PARAMETER</backend>
<entity>PARAMETER</entity>
</spoke>
</mdmmetadata>
</new>
</tuple>
If you want to create a rule to allow objects with age less than 25 then the following is the rule expression:
.//new/businessobject/CustomerMaster/age < 25
If you want to create a rule to allow objects with age less than 25 and the name field is John Doe then you can combine multiple conditions using 'and' 'or' operators. The rule expression is as follows:
.//new/businessobject/CustomerMaster/age < 25 and .//new/businessobject/CustomerMaster/name='John Doe'